package com.guigu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.mapper.BackDetailsMapper;
import com.guigu.pojo.BackDetails;
import com.guigu.service.BackDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-04-07
 */
@Service
public class BackDetailsServiceImpl extends ServiceImpl<BackDetailsMapper, BackDetails> implements BackDetailsService {

    @Autowired
    private BackDetailsMapper backDetailsMapper;

    @Override
    public List<BackDetails> getBackDetailsByBackId(Integer id) {
        QueryWrapper<BackDetails> queryWrapper = new QueryWrapper();
        queryWrapper.eq("back_id",id);
        List<BackDetails> backDetails = backDetailsMapper.selectList(queryWrapper);
        return backDetails;
    }
}
